/*
 * 
 *	Copyright (C) 2011 -- Alfred Reibenschuh
 *
 * 	This program is free software; you can redistribute it and/or 
 *	modify it under the terms of the GNU General Public License as 
 *	published by the Free Software Foundation; either version 2 of 
 *	the License, or (at your option) any later version.
 *
 *	This program is distributed in the hope that it will be useful, 
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of 
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 *	GNU General Public License for more details.
 * 
 */

package redoak.php.ldap;

import java.util.Vector;

public interface ILdapSession {

	void setHost(String hosturi);
	boolean setUri(String hosturi);
	void setPort(int port);

	boolean connect();
	boolean connect(String host, int port);
	boolean bind();
	boolean bindSimple(String dn, String cred);
	boolean bindSasl(String dn, String cred, String sasl_mech);

	boolean close();
	NamedHashtable get(String dn);
	NamedHashtable get(String dn, String filter);
	boolean delete(String dn);
	boolean add(NamedHashtable ht);
	boolean modify(NamedHashtable ht);
	Vector<NamedHashtable> search(String dn, String filter);
	Vector<NamedHashtable> list(String dn, String filter);
	
}
